{config_load file="_order_status.conf" section="`$lang`"}

<table width="100%" height="100%" border=0 cellpadding="0" cellspacing="0">
<tr><td valign="top">
{* if cusomer returns from PayPal display this *}
<b>
{if $Order && $Order->getTxn()}
 	{if $Order->getTxn() eq 'subscr_payment'}
 		{#_order_status__msgSubscrAdd#}{*You have successfully subscribed.*}
 	{elseif $Order->getTxn() eq 'subscr_signup'}
    	{#_order_status__msgSubscrAdd#}{*You have successfully subscribed.*}
 	{elseif $Order->getTxn() eq 'subscr_modify'}
    	{#_order_status__msgSubscrUpd#}{*You have successfully modified your subscription.*}
 	{elseif $Order->getTxn() eq 'subscr_cancel'}
    	{#_order_status__msgSubscrDel#}{*You have cancel your subscription.*}
 	{elseif $Order->getTxn() eq 'subscr_failed'}
    	{#_order_status__msgSubscrFail#}{*Payment for your subscription failed. Please retry.*}
 	{/if}
    </b>
{/if}
{if $smarty.get.step=='cancel'}
 	{#_order_status__msgSubscrCancel#}{*You have cancelled subscription process.*}<br><br><br><br><br><br><br><br>

{elseif $smarty.get.step=='success'}

	<!--Begin clixGalore Code -->

	<script language="javascript">
	{literal}
	var arrParams = location.search.split("?")[1].split("&");
	var SV   = '';
	var OID  = '';
	var temp = '';


	if(location.search.indexOf("?")!=-1)
	{
	  if (arrParams)
	  {
	    for (i=0;i<arrParams.length;i++)
	    {
	      var param=arrParams[i].split("=");
	      temp = param[0];

	      if(temp.toLowerCase()=="amt")
	      {
	         SV = param[1]
	      }
	      if(temp.toLowerCase()=="tx")
	      {
	         OID = param[1]
	      }
	    }
	  }
	}

	document.write ('<img src="https://www.clixGalore.com/AdvTransaction.aspx?AdID=9647&SV=' + SV + '&OID=' + OID + '" height="0" width="0" border="0">');
    {/literal}
	</script>
	<!--End clixGalore Code -->
{*	
{php}
	if ($_POST) {
		//var_dump($_POST);
		$item_name = $_POST['item_name'];
		$amount = $_POST['amount'];
		$item_number = $_POST['item_number'];
		$payment_gross = $_POST['payment_gross'];
		$payment_date = $_POST['payment_date'];
{/php}	
	<script id="pap_x2s6df8d" src="http://partner.intelli4x.com/scripts/salejs.php" type="text/javascript"></script>
	<script type="text/javascript">
		var sale = PostAffTracker.createSale();
{php}
		echo "sale.setTotalCost('$payment_gross');\n";
		echo "sale.setOrderID('$payment_date;');\n";
		echo "sale.setProductID('$item_name;');\n";
{/php}
		PostAffTracker.register();

		//setTimeout("window.location.href='http://intelli4x.com'",1500);
	</script>
{php}	
	}
{/php}

*}
	


	{#_order_status__msgSubscrAdd#}{*You have successfully subscribed.*}<br><br>
{elseif $smarty.get.step=='fail'}
	{#_order_status__msgSubscrFail#}{*Payment for your subscription failed.*}<br><br><br><br><br><br><br><br>
{/if}

</b>

{if $status_type}
	{if $status_type=="short"}
		{if $Staff->checkSubscribed()}
            {foreach name="systems" item="system" from=$Staff->getSubscrData()}
				<span class="systemTable"><b><nobr>{$system.Name}</nobr></b><br>
				{$system.system_days_left} {#_order_status__msgSubsAliveFinish#}</span><br>
			{/foreach}
		{/if}
	{/if}
{else if !$smarty.get.step}
	{if $Staff->Login() && !$Staff->checkSubscribed()}
		 {if $item!='settings'}
		 {/if}
	  	{if !$Staff->isTrialFinished()}
	       	{#_order_status__msgAttentionStart#} {$Staff->trialDaysLeft} {#_order_status__msgAttentionFinish#}
	       	<br><a href="/{$lang}/subscribe.html">{#_order_status__msgUpgrSubscrLink#}</a>
		{else}
	  		{#_order_status__msgTriedFinishedStart#} <a href="/{$lang}/subscribe.html">{#_order_status__msgTriedFinishedLink#}</a> {#_order_status__msgTriedFinishedFinish#}{*Your IntelliForex trial subscription has expired. Please <a href="/{$lang}/subscribe.html">upgrade</a> your subscription.*}
		{/if}
	 	{if $smarty.get.p!='settings'}
		 {/if}
	{/if}
	{if $Staff->checkSubscribed()}
		 {if $smarty.get.p!='settings'}
		 {/if}

	        {#_order_status__msgSubsAliveStart#}<br>
            {foreach name="systems" item="system" from=$Staff->getSubscrData()}
				<b>{$system.Name}</b> - {$system.system_days_left} {#_order_status__msgSubsAliveFinish#}<br>
			{/foreach}
	{/if}
{/if}



</td></tr></table>






